package com.weayer.remote;

import com.weayer.dto.Car;
import com.weayer.dto.DriverCarBindingRelationship;
import com.weayer.dto.DriverUser;
import com.weayer.dto.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @description: Api服务 - BOSS - 调用service-driver-user服务
 * @author: Weayer
 **/
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {
    @PostMapping("/user")
    public ResponseResult addUser(@RequestBody DriverUser driverUser);
    @PutMapping("/user")
    public ResponseResult updateUser(@RequestBody DriverUser driverUser);
    @PostMapping("/car")
    public ResponseResult addCar(@RequestBody Car car);
    @PutMapping("/car")
    public ResponseResult updateCar(@RequestBody Car car);
    @PostMapping("/driver-car-binding-relationship/bind")
    public ResponseResult bind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);
    @PostMapping("/driver-car-binding-relationship/unbind")
    public ResponseResult unbind(@RequestBody DriverCarBindingRelationship driverCarBindingRelationship);
}
